import React from 'react';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import StudentForm from './StudentForm';
import ResultPage from './ResultPage';
import NavigationLayout from './NavigationLayout';
import CheckResult from './checkResult';
import WpsHelper from './wpsHelper';
import PythonHelper from './pythonHelper';
import CheckPythonResult from './checkPythonReuslt';

function App() {
  return (
    <BrowserRouter>
      <Routes>
        {/* 1. 不需要导航栏的路由 */}
        <Route path="/results" element={<ResultPage />} />

        {/* 2. 其余需要导航栏的路由 */}
        <Route
          path="/*"
          element={
            <NavigationLayout>
              <Routes>
                <Route path="/" element={<StudentForm />} />
                <Route path="/checkResult" element={<CheckResult />} />
                <Route path="/wpshelper" element={<WpsHelper />} />
                <Route path="/pythonhelper" element={<PythonHelper />} />
                <Route path="/checkPythonResult" element={<CheckPythonResult />} />
              </Routes>
            </NavigationLayout>
          }
        />
      </Routes>
    </BrowserRouter>
  );
}

export default App;